/**
 * 设置系统管理员密码面板
 */
Ext.namespace("Ext.ux.config");
 
Ext.ux.config.AosAdminPasswordPanel = Ext.extend(Ext.ux.Wiz.Card, {

 	wizardWin: null,
 	monitorValid: true, 
	labelAlign: 'right',
	labelWidth: 180,
	
	initComponent: function(){
		Ext.ux.config.AosAdminPasswordPanel.superclass.initComponent.call(this);
		
		var items = [{
			xtype: 'fieldset',
			title: '系统管理员帐号',
			layout: 'form',
			items:[{
				id: 'passNotMatch',
				xtype: 'label',
				text: ''
			},{ 
				xtype: 'textfield',
				name: 'userName',
	            fieldLabel: '登录名', 
	            value: 'aosadmin',
	            disabled: true
			},{ 
				xtype: 'textfield',
				name: 'pwd', 
				fieldLabel: '密码', 
				allowBlank: false,
				inputType: 'password',
				minLength: 3,
				maxLength: 30
			},{ 
				xtype: 'textfield',
				name: 'confirmPwd', 
				fieldLabel: '确认密码', 
				allowBlank: false,
				inputType: 'password',
				minLength: 3,
				maxLength: 30
			}]
		}];   
	
		this.add(items);
	},
	
	isPasswordMatch: function(){
		return this.form.findField('pwd').getValue() == this.form.findField('confirmPwd').getValue();
	},
	
	showPasswordIsNotMatch: function(){
		var passNotMatchInfo = document.getElementById('passNotMatch');
		passNotMatchInfo.innerHTML = '&nbsp;&nbsp;&nbsp;<span style="color:red">提示：两次输入的密码不一致，请重新输入！</span>';
	},
	
	onCardShow: function(){
		this.wizardWin.previousButton.setDisabled(true);
	}
 });